# -*- coding: utf-8 -*-
from flask import Blueprint
from .views import *
urls = Blueprint('urls', __name__)

# 前端路由

urls.add_url_rule('/', view_func=Home_View.as_view('Home_View'))
urls.add_url_rule('/articles/', view_func=Articles_View)
urls.add_url_rule('/articles/l=<int:level>&p=<int:page>', view_func=Articles_View)
urls.add_url_rule('/tools/', view_func=Tools_View)
urls.add_url_rule('/tools/l=<int:level>', view_func=Tools_View)
urls.add_url_rule('/about', view_func=About_View.as_view('About_View'))
urls.add_url_rule('/sponsors', view_func=Sponsor_View.as_view('Sponsor_View'))
urls.add_url_rule('/articles/<int:id>', view_func=Article_View)
urls.add_url_rule('/tools/<int:id>', view_func=Tool_View)
urls.add_url_rule('/articles/<int:id>/up', view_func=Article_View_Praise)
urls.add_url_rule('/tools/<int:id>/up', view_func=Tool_View_Praise)

from .admin import line_Admin, pie_Admin
# 后台页面路由
urls.add_url_rule('/backstage/login/', view_func=Login_View, methods=['GET', 'POST'])


